package sData

import (
	"encoding/json"
)

type CfgReward struct {
	_cfg_id			int64
	_tp			RewardType
	_items			string
}

func (myself *CfgReward) GetTableName() string {
    return "reward"
}
/**
 * 
 */
func (myself *CfgReward) GetCfg_id() int64 {
	return myself._cfg_id
}

/**
 * 
 */
func (myself *CfgReward) GetTp() RewardType {
	return myself._tp
}

/**
 * 
 */
func (myself *CfgReward) GetItems(v interface{}) interface{} {
        json.Unmarshal([]byte(myself._items),v)
    return v
}

func NewCfgReward(row []interface{}) interface{} {
	newObj := &CfgReward{}
	if row==nil {return newObj}
	newObj._cfg_id = int64(row[0].(float64))
	newObj._tp = RewardType(row[1].(float64))
	tmp_2,_ := json.Marshal(row[2].([]interface {}))
	newObj._items = string(tmp_2)
	return newObj
}

const (
	TableRewardName = "reward"
)